#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QTcpServer>
#include <QTcpSocket>
#include "v4l2api.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();


private slots:


    void onUpdateCameraUi();
    void onNewClientConnect();
     void onRecvDataSlot();


private:
    Ui::Widget *ui;

    QTimer *m_timer;
    V4l2Api *v4l2;

    QTcpServer *m_tcpServer;
    QTcpSocket* tcpClient;
    QImage saveImg;
     QImage img;
};
#endif // WIDGET_H
